<?php
  mysql_connect("localhost", "root", "password" ) or die (mysql_error());
  mysql_select_db("overall_pos_db") or die( mysql_error());

  $q = "
    select 
      description 
    from product 
    limit 0, 10;";

  $r = mysql_query($q) or die( mysql_error());
  $n = mysql_numrows($r);

 
  for( $i = 0; $i < $n; $i++ ) {
    $e=mysql_fetch_assoc($r);
    $o[] = $e;
  }

  print(json_encode($o));
  mysql_close();
  
?>
